package com.qcby.exampleprovider;

import com.qcby.examplecommon.service.UserService;
import com.qcby.rpctiny.RpcApplication;
import com.qcby.rpctiny.bootstrap.ProviderBootstrap;
import com.qcby.rpctiny.config.RegistryConfig;
import com.qcby.rpctiny.config.RpcConfig;
import com.qcby.rpctiny.model.ServiceMetaInfo;
import com.qcby.rpctiny.model.ServiceRegisterInfo;
import com.qcby.rpctiny.registry.LocalRegistry;
import com.qcby.rpctiny.registry.Registry;
import com.qcby.rpctiny.registry.RegistryFactory;
import com.qcby.rpctiny.server.tcp.VertxTcpServer;

import java.util.ArrayList;
import java.util.List;

/**
 * 服务提供者示例
 */
public class ProviderExample {
    public static void main(String[] args) {
        // 要注册的服务
        List<ServiceRegisterInfo<?>> serviceRegisterInfoList = new ArrayList<>();
        ServiceRegisterInfo serviceRegisterInfo = new ServiceRegisterInfo(UserService.class.getName(), UserServiceImpl.class);
        serviceRegisterInfoList.add(serviceRegisterInfo);

        // 初始化
        ProviderBootstrap.init(serviceRegisterInfoList);
    }
}
